// pages/mall/mall.js
Page({
  data: {
    active:0,
    kind: [{ url: '../sold/sold?status=0', name: '全部' }, { url: '../sold/sold?status=1', name: '团' }, { url: '../sold/sold?status=2', name: '拼' }, { url: '../sold/sold?status=3', name: '券' }, { url: '../sold/sold?status=4', name: '免' }],
    list: [{ id: '1', img: '../img/bei.jpg', name: '留一手火锅代金券一张', price: '15.00', status: 3 }, { id: '1', img: '../img/bei.jpg', name: '4人份团餐一份', price: '405.00', status: 1 }, { id: '1', img: '../img/bei.jpg', name: '6人份团餐一份', price: '505.00', status: 1 }, { id: '1', img: '../img/bei.jpg', name: '8人份团餐一份', price: '715.00' ,status: 1 }, { id: '1', img: '../img/bei.jpg', name: '免费饮料一瓶', price: '0.00', status: 4 }, { id: '1', img: '../img/bei.jpg', name: '拼菜一份', price: '15.00', status: 2 }]
  }, 
   road:function(e){
     let id = e.currentTarget.dataset.id;
     let status = e.currentTarget.dataset.status;
       wx.navigateTo({
         url: '../edit/edit?id=' + id+'&status='+status
       })
   },

  onLoad: function (options) {
  this.setData({
    active:options.status
  })



  
  },
  onReady: function () {
  
  },
  onReachBottom: function () {
    var data = this.data.list;
    data.push({ id: '1', img: '../img/bei.jpg', name: '休闲零食招牌大份量蛋炒饭商家设置不起拼', price: '15.00' }, { id: '1', img: '../img/bei.jpg', name: '休闲零食招牌大份量蛋炒饭商家设置不起拼', price: '15.00' }, { id: '1', img: '../img/bei.jpg', name: '休闲零食招牌大份量蛋炒饭商家设置不起拼', price: '15.00' }, { id: '1', img: '../img/bei.jpg', name: '休闲零食招牌大份量蛋炒饭商家设置不起拼', price: '15.00' }, { id: '1', img: '../img/bei.jpg', name: '休闲零食招牌大份量蛋炒饭商家设置不起拼', price: '15.00' }, { id: '1', img: '../img/bei.jpg', name: '休闲零食招牌大份量蛋炒饭商家设置不起拼', price: '15.00' }, { id: '1', img: '../img/bei.jpg', name: '休闲零食招牌大份量蛋炒饭商家设置不起拼', price: '15.00' });
    this.setData({
      list: data
    });
  }
})